home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Lists.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  11.9 KB  |  499 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Lists.a
  3. ;
  4. ;    Contains:    List Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    Mac OS 8
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__LISTS__') = 'UNDEFINED' THEN
  19. __LISTS__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__CONTROLS__') = 'UNDEFINED' THEN
  25.     include 'Controls.a'
  26.     ENDIF
  27.  
  28. Cell                    RECORD 0
  29. f                         ds        Point
  30. sizeof                     EQU *                    ; size:   $4 (4)
  31.                         ENDR
  32.  
  33.  
  34. ListBounds                RECORD 0
  35. f                         ds        Rect
  36. sizeof                     EQU *                    ; size:   $8 (8)
  37.                         ENDR
  38.  
  39.  
  40. DataArray                RECORD 0
  41. elements                 ds.b    32001
  42.                          ORG 32002
  43. sizeof                     EQU *                    ; size:   $7D02 (32002)
  44.                         ENDR
  45.  
  46.  
  47.     IF ¬ TARGET_OS_MAC THEN
  48. ;  QuickTime 3.0 
  49. ; typedef long                             ListNotification
  50.  
  51.  
  52. listNotifyNothing                EQU        'nada'                ; No (null) notification
  53. listNotifyClick                    EQU        'clik'                ; Control was clicked
  54. listNotifyDoubleClick            EQU        'dblc'                ; Control was double-clicked
  55. listNotifyPreClick                EQU        'pclk'                ; Control about to be clicked
  56.     ENDIF
  57. ListRec                    RECORD 0
  58. rView                     ds        Rect            ; offset: $0 (0)
  59. port                     ds.l    1                ; offset: $8 (8)
  60. indent                     ds        Point            ; offset: $C (12)
  61. cellSize                 ds        Point            ; offset: $10 (16)
  62. visible                     ds        ListBounds        ; offset: $14 (20)
  63. vScroll                     ds.l    1                ; offset: $1C (28)
  64. hScroll                     ds.l    1                ; offset: $20 (32)
  65. selFlags                 ds.b    1                ; offset: $24 (36)
  66. lActive                     ds.b    1                ; offset: $25 (37)
  67. lReserved                 ds.b    1                ; offset: $26 (38)
  68. listFlags                 ds.b    1                ; offset: $27 (39)
  69. clikTime                 ds.l    1                ; offset: $28 (40)
  70. clikLoc                     ds        Point            ; offset: $2C (44)
  71. mouseLoc                 ds        Point            ; offset: $30 (48)
  72. lClickLoop                 ds.l    1                ; offset: $34 (52)
  73. lastClick                 ds        Cell            ; offset: $38 (56)
  74. refCon                     ds.l    1                ; offset: $3C (60)
  75. listDefProc                 ds.l    1                ; offset: $40 (64)
  76. userHandle                 ds.l    1                ; offset: $44 (68)
  77. dataBounds                 ds        ListBounds        ; offset: $48 (72)
  78. cells                     ds.l    1                ; offset: $50 (80)
  79. maxIndex                 ds.w    1                ; offset: $54 (84)
  80. cellArray                 ds.w    1                ; offset: $56 (86) <-- really an array of length one
  81. sizeof                     EQU *                    ; size:   $58 (88)
  82.                         ENDR
  83. ; typedef struct ListRec *                ListPtr
  84.  
  85. ; typedef ListPtr *                        ListHandle
  86.  
  87. ;  ListRef is obsolete.  Use ListHandle. 
  88. ; typedef ListHandle                     ListRef
  89.  
  90.  
  91.  
  92.  
  93.                                                             ; ListRec.listFlags bits
  94. lDoVAutoscrollBit                EQU        1
  95. lDoHAutoscrollBit                EQU        0
  96.  
  97.                                                             ; ListRec.listFlags masks
  98. lDoVAutoscroll                    EQU        2
  99. lDoHAutoscroll                    EQU        1
  100.  
  101.  
  102.                                                             ; ListRec.selFlags bits
  103. lOnlyOneBit                        EQU        7
  104. lExtendDragBit                    EQU        6
  105. lNoDisjointBit                    EQU        5
  106. lNoExtendBit                    EQU        4
  107. lNoRectBit                        EQU        3
  108. lUseSenseBit                    EQU        2
  109. lNoNilHiliteBit                    EQU        1
  110.  
  111.  
  112.                                                             ; ListRec.selFlags masks
  113. lOnlyOne                        EQU        -128
  114. lExtendDrag                        EQU        64
  115. lNoDisjoint                        EQU        32
  116. lNoExtend                        EQU        16
  117. lNoRect                            EQU        8
  118. lUseSense                        EQU        4
  119. lNoNilHilite                    EQU        2
  120.  
  121.  
  122.                                                             ; LDEF messages
  123. lInitMsg                        EQU        0
  124. lDrawMsg                        EQU        1
  125. lHiliteMsg                        EQU        2
  126. lCloseMsg                        EQU        3
  127.  
  128.  
  129.  
  130.  
  131.  
  132.     IF ¬ TARGET_OS_MAC THEN
  133. ;  QuickTime 3.0 
  134. ;
  135. ; extern void LSetNotificationCallback(ListNotificationProcPtr callBack, ListHandle lHandle)
  136. ;
  137.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  138.         IMPORT_CFM_FUNCTION LSetNotificationCallback
  139.     ENDIF
  140.  
  141.     ENDIF
  142.  
  143.  
  144. ;
  145. ; pascal ListHandle LNew(const Rect *rView, const ListBounds *dataBounds, Point cSize, short theProc, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert)
  146. ;
  147.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  148.         Macro
  149.         _LNew
  150.             move.w              #$0044,-(sp)
  151.             dc.w                $A9E7
  152.         EndM
  153.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  154.         IMPORT_CFM_FUNCTION LNew
  155.     ENDIF
  156.  
  157. ;
  158. ; pascal void LDispose(ListHandle lHandle)
  159. ;
  160.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  161.         Macro
  162.         _LDispose
  163.             move.w              #$0028,-(sp)
  164.             dc.w                $A9E7
  165.         EndM
  166.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  167.         IMPORT_CFM_FUNCTION LDispose
  168.     ENDIF
  169.  
  170. ;
  171. ; pascal short LAddColumn(short count, short colNum, ListHandle lHandle)
  172. ;
  173.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  174.         Macro
  175.         _LAddColumn
  176.             move.w              #$0004,-(sp)
  177.             dc.w                $A9E7
  178.         EndM
  179.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  180.         IMPORT_CFM_FUNCTION LAddColumn
  181.     ENDIF
  182.  
  183. ;
  184. ; pascal short LAddRow(short count, short rowNum, ListHandle lHandle)
  185. ;
  186.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  187.         Macro
  188.         _LAddRow
  189.             move.w              #$0008,-(sp)
  190.             dc.w                $A9E7
  191.         EndM
  192.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  193.         IMPORT_CFM_FUNCTION LAddRow
  194.     ENDIF
  195.  
  196. ;
  197. ; pascal void LDelColumn(short count, short colNum, ListHandle lHandle)
  198. ;
  199.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  200.         Macro
  201.         _LDelColumn
  202.             move.w              #$0020,-(sp)
  203.             dc.w                $A9E7
  204.         EndM
  205.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  206.         IMPORT_CFM_FUNCTION LDelColumn
  207.     ENDIF
  208.  
  209. ;
  210. ; pascal void LDelRow(short count, short rowNum, ListHandle lHandle)
  211. ;
  212.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  213.         Macro
  214.         _LDelRow
  215.             move.w              #$0024,-(sp)
  216.             dc.w                $A9E7
  217.         EndM
  218.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  219.         IMPORT_CFM_FUNCTION LDelRow
  220.     ENDIF
  221.  
  222. ;
  223. ; pascal Boolean LGetSelect(Boolean next, Cell *theCell, ListHandle lHandle)
  224. ;
  225.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  226.         Macro
  227.         _LGetSelect
  228.             move.w              #$003C,-(sp)
  229.             dc.w                $A9E7
  230.         EndM
  231.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  232.         IMPORT_CFM_FUNCTION LGetSelect
  233.     ENDIF
  234.  
  235. ;
  236. ; pascal Cell LLastClick(ListHandle lHandle)
  237. ;
  238.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  239.         Macro
  240.         _LLastClick
  241.             move.w              #$0040,-(sp)
  242.             dc.w                $A9E7
  243.         EndM
  244.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  245.         IMPORT_CFM_FUNCTION LLastClick
  246.     ENDIF
  247.  
  248. ;
  249. ; pascal Boolean LNextCell(Boolean hNext, Boolean vNext, Cell *theCell, ListHandle lHandle)
  250. ;
  251.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  252.         Macro
  253.         _LNextCell
  254.             move.w              #$0048,-(sp)
  255.             dc.w                $A9E7
  256.         EndM
  257.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  258.         IMPORT_CFM_FUNCTION LNextCell
  259.     ENDIF
  260.  
  261. ;
  262. ; pascal Boolean LSearch(const void *dataPtr, short dataLen, ListSearchUPP searchProc, Cell *theCell, ListHandle lHandle)
  263. ;
  264.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  265.         Macro
  266.         _LSearch
  267.             move.w              #$0054,-(sp)
  268.             dc.w                $A9E7
  269.         EndM
  270.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  271.         IMPORT_CFM_FUNCTION LSearch
  272.     ENDIF
  273.  
  274. ;
  275. ; pascal void LSize(short listWidth, short listHeight, ListHandle lHandle)
  276. ;
  277.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  278.         Macro
  279.         _LSize
  280.             move.w              #$0060,-(sp)
  281.             dc.w                $A9E7
  282.         EndM
  283.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  284.         IMPORT_CFM_FUNCTION LSize
  285.     ENDIF
  286.  
  287. ;
  288. ; pascal void LSetDrawingMode(Boolean drawIt, ListHandle lHandle)
  289. ;
  290.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  291.         Macro
  292.         _LSetDrawingMode
  293.             move.w              #$002C,-(sp)
  294.             dc.w                $A9E7
  295.         EndM
  296.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  297.         IMPORT_CFM_FUNCTION LSetDrawingMode
  298.     ENDIF
  299.  
  300. ;
  301. ; pascal void LScroll(short dCols, short dRows, ListHandle lHandle)
  302. ;
  303.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  304.         Macro
  305.         _LScroll
  306.             move.w              #$0050,-(sp)
  307.             dc.w                $A9E7
  308.         EndM
  309.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  310.         IMPORT_CFM_FUNCTION LScroll
  311.     ENDIF
  312.  
  313. ;
  314. ; pascal void LAutoScroll(ListHandle lHandle)
  315. ;
  316.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  317.         Macro
  318.         _LAutoScroll
  319.             move.w              #$0010,-(sp)
  320.             dc.w                $A9E7
  321.         EndM
  322.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  323.         IMPORT_CFM_FUNCTION LAutoScroll
  324.     ENDIF
  325.  
  326. ;
  327. ; pascal void LUpdate(RgnHandle theRgn, ListHandle lHandle)
  328. ;
  329.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  330.         Macro
  331.         _LUpdate
  332.             move.w              #$0064,-(sp)
  333.             dc.w                $A9E7
  334.         EndM
  335.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  336.         IMPORT_CFM_FUNCTION LUpdate
  337.     ENDIF
  338.  
  339. ;
  340. ; pascal void LActivate(Boolean act, ListHandle lHandle)
  341. ;
  342.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  343.         Macro
  344.         _LActivate
  345.             clr.w               -(sp)
  346.             dc.w                $A9E7
  347.         EndM
  348.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  349.         IMPORT_CFM_FUNCTION LActivate
  350.     ENDIF
  351.  
  352. ;
  353. ; pascal void LCellSize(Point cSize, ListHandle lHandle)
  354. ;
  355.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  356.         Macro
  357.         _LCellSize
  358.             move.w              #$0014,-(sp)
  359.             dc.w                $A9E7
  360.         EndM
  361.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  362.         IMPORT_CFM_FUNCTION LCellSize
  363.     ENDIF
  364.  
  365. ;
  366. ; pascal Boolean LClick(Point pt, short modifiers, ListHandle lHandle)
  367. ;
  368.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  369.         Macro
  370.         _LClick
  371.             move.w              #$0018,-(sp)
  372.             dc.w                $A9E7
  373.         EndM
  374.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  375.         IMPORT_CFM_FUNCTION LClick
  376.     ENDIF
  377.  
  378. ;
  379. ; pascal void LAddToCell(const void *dataPtr, short dataLen, Cell theCell, ListHandle lHandle)
  380. ;
  381.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  382.         Macro
  383.         _LAddToCell
  384.             move.w              #$000C,-(sp)
  385.             dc.w                $A9E7
  386.         EndM
  387.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  388.         IMPORT_CFM_FUNCTION LAddToCell
  389.     ENDIF
  390.  
  391. ;
  392. ; pascal void LClrCell(Cell theCell, ListHandle lHandle)
  393. ;
  394.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  395.         Macro
  396.         _LClrCell
  397.             move.w              #$001C,-(sp)
  398.             dc.w                $A9E7
  399.         EndM
  400.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  401.         IMPORT_CFM_FUNCTION LClrCell
  402.     ENDIF
  403.  
  404. ;
  405. ; pascal void LGetCell(void *dataPtr, short *dataLen, Cell theCell, ListHandle lHandle)
  406. ;
  407.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  408.         Macro
  409.         _LGetCell
  410.             move.w              #$0038,-(sp)
  411.             dc.w                $A9E7
  412.         EndM
  413.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  414.         IMPORT_CFM_FUNCTION LGetCell
  415.     ENDIF
  416.  
  417. ;
  418. ; pascal void LRect(Rect *cellRect, Cell theCell, ListHandle lHandle)
  419. ;
  420.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  421.         Macro
  422.         _LRect
  423.             move.w              #$004C,-(sp)
  424.             dc.w                $A9E7
  425.         EndM
  426.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  427.         IMPORT_CFM_FUNCTION LRect
  428.     ENDIF
  429.  
  430. ;
  431. ; pascal void LSetCell(const void *dataPtr, short dataLen, Cell theCell, ListHandle lHandle)
  432. ;
  433.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  434.         Macro
  435.         _LSetCell
  436.             move.w              #$0058,-(sp)
  437.             dc.w                $A9E7
  438.         EndM
  439.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  440.         IMPORT_CFM_FUNCTION LSetCell
  441.     ENDIF
  442.  
  443. ;
  444. ; pascal void LSetSelect(Boolean setIt, Cell theCell, ListHandle lHandle)
  445. ;
  446.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  447.         Macro
  448.         _LSetSelect
  449.             move.w              #$005C,-(sp)
  450.             dc.w                $A9E7
  451.         EndM
  452.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  453.         IMPORT_CFM_FUNCTION LSetSelect
  454.     ENDIF
  455.  
  456. ;
  457. ; pascal void LDraw(Cell theCell, ListHandle lHandle)
  458. ;
  459.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  460.         Macro
  461.         _LDraw
  462.             move.w              #$0030,-(sp)
  463.             dc.w                $A9E7
  464.         EndM
  465.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  466.         IMPORT_CFM_FUNCTION LDraw
  467.     ENDIF
  468.  
  469.  
  470. ;
  471. ; pascal void LGetCellDataLocation(short *offset, short *len, Cell theCell, ListHandle lHandle)
  472. ;
  473.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  474.         Macro
  475.         _LGetCellDataLocation
  476.             move.w              #$0034,-(sp)
  477.             dc.w                $A9E7
  478.         EndM
  479.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  480.         IMPORT_CFM_FUNCTION LGetCellDataLocation
  481.     ENDIF
  482.  
  483.     IF ¬ TARGET_OS_MAC THEN
  484. ;  QuickTime 3.0 
  485. ;
  486. ; extern void LSetLDEF(ListDefProcPtr proc, ListRef lHandle)
  487. ;
  488.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  489.         IMPORT_CFM_FUNCTION LSetLDEF
  490.     ENDIF
  491.  
  492.     ENDIF
  493.  
  494.     IF OLDROUTINENAMES THEN
  495.     ENDIF    ; OLDROUTINENAMES
  496.  
  497.     ENDIF ; __LISTS__ 
  498.  
  499.